<?xml version="1.0" encoding="UTF-8" ?>
<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<%@page import="vn.edu.hungvuongaptech.dao.TimeSheetDAO"%>
<%@page import="java.util.Enumeration"%>
<%@page import="vn.edu.hungvuongaptech.model.TimeSheetModel"%>
<%@page import="vn.edu.hungvuongaptech.common.Constant"%>
<fmt:bundle basename="i18n">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<link rel="stylesheet" href="<%=request.getContextPath()%>/css/general.css" />
<script type="text/javascript" src="<%=request.getContextPath()%>/js/General.js"></script>
<script type="text/javascript" src="<%=request.getContextPath()%>/js/jquery-1.3.2.min.js"></script>
<title>Confirm TimeSheet Deletion</title>
</head>
<body>
	<div id="main-wrap">
		<!-- S HEAD CONTENT -->
			<jsp:include page="../block/header.jsp" />
		<!-- E HEAD CONTENT -->

		<div class="space"></div>

		<!-- S BODY CONTENT -->
		<div id="body">
			<div id="center-column">
				<!-- Dynamic content place here -->
				<form action="DeleteTimeSheetController" method="post">
				<c:choose>
					<c:when test="${ not empty requestScope.timeSheetModels }">
						<p class='error_msg'> <fmt:message key="timesheet.confirmTimeSheetDeletionLabel" /> </p>
						<table border='1' cellpadding='2' width="100%">
							<tr>
								<th width="20px"> <input type="checkbox" name="chkSelectAll" id="chkSelectAll" alt="Select All" onclick="checkAll(this.name, 'chkTimeSheetID')" checked="checked" /> </th>
								<th width="200px"><fmt:message key="timesheet.table.dateLabel" /></th>
								<th width="50px"><fmt:message key="timesheet.table.timeLabel" /></th>
								<th><fmt:message key="timesheet.table.descriptionLabel" /></th>
							</tr>
							<c:forEach items="${ requestScope.timeSheetModels }" var="item">
							<tr>
								<td>
									<input type="checkbox" name="chkTimeSheetID" id="chkTimeSheetID" alt="${ item.timeSheetId }" value="${ item.timeSheetId }" checked="checked" />
								</td>
								<td align='right'>${ item.date }</td>
								<td align='right'>${ item.time }</td>
								<td>${ item.description }</td>
							</tr>
							</c:forEach>
						</table>
						<div style="padding: 10px;">
							<input type="submit" value="<fmt:message key="timesheet.button.yesLabel" />" name="btnYes" id="btnYes" class="button" />
							&nbsp;&nbsp;
							<input type="button" value="<fmt:message key="timesheet.button.noLabel" />" name="btnNo" id="btnYes" class="button" onclick="document.location.href='TimeSheet.jsp'" />
						</div>
					</c:when>
					<c:otherwise>
						<p align='center' class='error_msg'> <fmt:message key="timesheet.errorTimesheetDeletion" /> </p>
					</c:otherwise>
				</c:choose>
				</form>
				<!-- Dynamic content place here -->
			</div>
		</div>
		<!-- E BODY CONTENT -->

		<div class="space"></div>

		<!-- S FOOT CONTENT -->
			<jsp:include page="../block/footer.jsp" />
		<!-- E FOOT CONTENT -->
	</div>
</body>
</html>
</fmt:bundle>